package com.jy.api.payReq;

import com.jy.api.domain.Order;
import com.jy.api.domain.StorePay;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class HuiFuJSPayReq {


    private String memberId;

    private String ordAmt;

    private String apiVersion = "3.0.0.2";

    private String payChannelType = "W2";

    private String payChannelId;

    private String payScene = "01";

    private String appId;

    private String openId;

    private String clientIp;

    private String termOrdId;

    private String goodsDesc;

    private String merPriv;


    public HuiFuJSPayReq(Order order, StorePay storePay, String openId) {
        this.memberId = storePay.getMchId();
        this.ordAmt = String.valueOf((int) Math.rint(order.getAmount() * 100));
        this.payChannelId = "310000013002405554";
        this.appId = "wxf6f45bc02f8e7de8";
        this.openId = openId;
        this.clientIp = "172.18.0.1";
        this.termOrdId = order.getId();

    }

}
